<template>
	<div>
		<!-- 主视图 -->
		<el-container>
			<!-- 导航栏 -->
			<el-header style="height: 80px;line-height: 100px; margin-top: 30px;">
				<!-- <el-tabs type="border-card">
					<el-tab-pane>
						<span slot="label"><i class="el-icon-date"></i>
							<router-link to="/Leading_endList" tag="span">首页</router-link>
							</router-link>
						</span>
					</el-tab-pane>

				</el-tabs> -->
				<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect"
					style="height: 80px;">
					<el-menu-item style="font: 40px Extra large;line-height: ;">运动与健康</el-menu-item>
					<el-menu-item index="1">
						<router-link to="/Leading_end/" tag="span">首页</router-link>
					</el-menu-item>
					<el-submenu index="2">
						<template slot="title">我的课程</template>
						<el-menu-item index="2-1">团课</el-menu-item>
						<el-menu-item index="2-2">私教课</el-menu-item>
						<el-menu-item index="2-3">训练营</el-menu-item>
					</el-submenu>
					<el-menu-item index="3">
            <router-link to="/DietAndFoodMainView" tag="span">营养管理</router-link>
          </el-menu-item>
          <el-menu-item index="4">
            <router-link to="bbsView" tag="span">社区</router-link>
          </el-menu-item>
					<el-menu-item index="5"><router-link to="/personalCenter" tag="span">个人中心</router-link></el-menu-item>
				</el-menu>

			</el-header>



			<!-- 左边栏 -->
			<!-- <el-aside width="200px">
					<el-aside width="200px" style="background-color: rgb(238, 241, 246)">
						默认打开第几个
						<el-menu :default-openeds="['1', '3']">
							<el-submenu index="1">
								<template slot="title"><i class="el-icon-message"></i>个人信息</template>
								<el-menu-item-group>
									<el-menu-item index="1-1">选项1</el-menu-item>
									<el-menu-item index="1-2">选项2</el-menu-item>
									<el-menu-item index="1-3">选项3</el-menu-item>
								</el-menu-item-group>
							</el-submenu>
							<el-submenu index="2">
								<template slot="title"><i class="el-icon-menu"></i>身体数据</template>
								<el-menu-item-group>
									<el-menu-item index="2-1">选项1</el-menu-item>
									<el-menu-item index="2-2">选项2</el-menu-item>
								</el-menu-item-group>
							</el-submenu>

						</el-menu>
					</el-aside>
				</el-aside> -->
			<!-- 主内容区 -->
			<el-main>
				<router-view/>
			</el-main>

		</el-container>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				activeIndex: '1',

			};
		},
		methods: {
			handleSelect(key, keyPath) {
				console.log(key, keyPath);
				
			}
		}
	}
</script>

<style>
	/* 整个布局的style */
	.el-header,
	.el-footer {
		/* background-color: #B3C0D1; */
		color: #333;
		text-align: center;
		/* line-height: 60px; */
	}

	.el-aside {
		background-color: #D3DCE6;
		color: #333;
		text-align: center;
		line-height: 200px;
	}

	.el-main {
		background-color: #E9EEF3;
		color: #333;
		text-align: center;
		line-height: 20px;
	}

	body>.el-container {
		margin-bottom: 40px;
	}

	.el-container:nth-child(5) .el-aside,
	.el-container:nth-child(6) .el-aside {
		line-height: 260px;
	}

	.el-container:nth-child(7) .el-aside {
		line-height: 320px;
	}
</style>
